﻿using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
using EasyXaf.LowCode.WorkflowEditors.Models;

namespace EasyXaf.LowCode.WorkflowEditors;

public sealed class LowCodeWorkflowEditorsModule : ModuleBase
{
    public LowCodeWorkflowEditorsModule()
    {
        RequiredModuleTypes.Add(typeof(LowCodeWorkflowEditorsModelsModule));
    }

    protected override void RegisterEditorDescriptors(EditorDescriptorsFactory editorDescriptorsFactory)
    {
        base.RegisterEditorDescriptors(editorDescriptorsFactory);

        editorDescriptorsFactory.RegisterPropertyEditorAlias("WorkflowEditor", typeof(string), false);
        editorDescriptorsFactory.RegisterPropertyEditor("WorkflowEditor", typeof(string), typeof(WorkflowEditor), true);
    }
}